home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 5 / chrpro3.zip / CFNAMESC.CMD < prev    next >
OS/2 REXX Batch file  |  1991-01-21  |  7KB  |  282 lines

  1. * Program CFNAMESC - Allows entering/scanning/changing names in the CDIRFILE
  2. Clear
  3. Use cdirfile index cdirfile
  4. STORE $(SPACT,4,27) TO MD1A
  5. SKIP
  6. STORE $(SPACT,21,1) TO MD1B
  7. SKIP
  8. Store $(spact,27,4) to MD3Y
  9. SKIP
  10. Store $(spact,3,29) to MD3A
  11. SKIP
  12. Store $(spact,3,29) to MD3B
  13. SKIP
  14. Store $(spact,3,29) to MD3C
  15. SKIP
  16. Store $(spact,30,2) to MD1
  17. SKIP
  18. Store val($(SPACT,28,4)) to MD2
  19. SKIP
  20. STORE $(spact,26,3) to MD3
  21. SKIP
  22. Store $(spact,26,3) to MD4
  23. SKIP
  24. Store $(spact,21,3) to MD5
  25. SKIP
  26. Store $(spact,21,10) to MD6
  27. SKIP
  28. Store $(spact,21,10) to MD7
  29. SKIP
  30. Store $(spact,21,10) to MD8
  31. SKIP
  32. Store $(spact,21,10) to MD9
  33. SKIP
  34. Store $(spact,29,3) to MD12
  35. SKIP
  36. Store $(spact,34,1) to MD13
  37. Store STR(val(MD13)+5,1) to NN
  38. GOTO 23
  39. Store $(spact,12,18) to MD11
  40. GOTO 27
  41. If $(spact,3,29)='                               '
  42.   Store 'No ' to MD10
  43. else
  44.   Store 'Yes' to MD10
  45. endif
  46.   Erase
  47.   @ 1,10 SAY ' EDITING CONTRIBUTIONS NAMES, PARAMETERS'
  48.   @ 3,0  SAY 'CHURCH NAME     ' GET MD1A
  49.   @ 3,55 say 'Data disk ' GET MD1B
  50.   @ 4,0 say 'Days of the month/quarter:    MM/DD MM/DD MM/DD MM/DD MM/DD  YEAR'
  51.   @ 5,29 get MD3A
  52.   @ 5,60 get MD3Y
  53.   @ 6,29 GET MD3B
  54.   @ 7,29 GET MD3C
  55.   @  9,0 say 'Contributions Statements period  ' get MD1
  56.   @ 10,0 say 'Number of offering envelopes   ' get MD2
  57.   @ 11,0 say 'Print Contributions pages during entry? ' GET MD3
  58.   @ 12,0 say 'Contributions statements Special form? ' get MD4
  59.   @ 13,0 say 'Print pledging notice on statements? ' get MD5
  60.   @ 15,0 say 'Offering Category 1  ' get MD6
  61.   @ 16,0 say 'Offering Category 2  ' get MD7
  62.   @ 17,0 say 'Offering Category 3  ' get MD8
  63.   @ 18,0 say 'Offering Category 4  ' get MD9
  64.   @ 19,0 say 'Enable Contribution Special Funds? ' get MD12
  65.   @ 20,0 say 'Pledged assigned to category      ' get MD13
  66.   @ 20,38 say MD&NN+'        (1/2/3/4/T) '
  67.   @ 21,0 say 'Printer, special set-up characters' get MD11
  68.   @ 22,0 say 'Include a note at the end of the Contributions Statements? '
  69.   @ 22,60 get MD10
  70.   @ 23,35 say ' Press <ctrl-W> to exit.'
  71.   READ
  72.   If @(MD13,'1234T')=0
  73.     ? 'Invalid PLEDGED CATEGORY assignment.  No change.'
  74.   ENDIF
  75. Accept '                                                         SAVE? ' to XX
  76. If !(XX)='Y'
  77. GOTO 1
  78. Replace spact with $(spact,1,3)+MD1A
  79. skip
  80. Replace spact with $(spact,1,20)+MD1B
  81. SKIP
  82. Replace spact with $(spact,1,26)+MD3Y+')'
  83. SKIP
  84. Replace spact with $(spact,1,2)+MD3A
  85. SKIP
  86. Replace spact with $(spact,1,2)+MD3B
  87. SKIP
  88. Replace SPACT WITH $(SPACT,1,2)+MD3C
  89. SKIP
  90. Replace spact with $(spact,1,29)+MD1
  91. SKIP
  92. Replace spact with $(spact,1,27)+str(MD2,4)
  93. SKIP
  94. Replace spact with $(spact,1,25)+MD3
  95. SKIP
  96. Replace spact with $(spact,1,25)+MD4
  97. SKIP
  98.   Replace spact with $(spact,1,20)+MD5
  99. SKIP
  100.   Replace spact with $(spact,1,20)+MD6
  101. SKIP
  102.   Replace spact with $(spact,1,20)+MD7
  103. SKIP
  104.   Replace spact with $(spact,1,20)+MD8
  105. SKIP
  106.   Replace spact with $(spact,1,20)+MD9
  107. SKIP
  108.   Replace spact with $(spact,1,28)+MD12
  109. SKIP
  110.   Replace spact with $(spact,1,33)+MD13
  111.   GOTO 23
  112.   Replace spact with $(spact,1,11)+MD11
  113. endif
  114.       Store '!0' to OFFN
  115.      If !(MD10)<>'Y'
  116.       If !(MD10)<>'Q'
  117.         GOTO 27
  118.         Replace cdirindex with '!0 '
  119.         Replace spact with ' '
  120.       endif
  121.       USE
  122.       RETURN
  123.      else
  124.       Release MD10,MDx10,MD11,MDX11,MD12,MD3A,MD3AX,MD3B,MD3BX,MD3C,MD3CX,MD3Y
  125.       GOTO 27
  126.       Store '0' to N
  127.       Do while N<>'*'
  128.         Store $(spact,2,39) to MD&N
  129.         SKIP
  130.         Store MD&N+$(spact,2,39) to MD&N
  131.         SKIP
  132.         Store str(val(N)+1,1) to N
  133.       enddo
  134.       Erase
  135.       @  4,10 say 'Now Editing the End-of-Contributions-Statements Message -'
  136.       @  6,0 get MD0
  137.       @  7,0 get MD1
  138.       @  8,0 get MD2
  139.       @  9,0 get MD3
  140.       @ 10,0 get MD4
  141.       @ 11,0 get MD5
  142.       @ 12,0 get MD6
  143.       @ 13,0 get MD7
  144.       @ 14,0 get MD8
  145.       @ 15,0 get MD9
  146.       @ 17,20 say 'Press <ctrl-W> when finished.'
  147.       READ
  148.       ?
  149.       Accept '            SAVE? ' to XX
  150.       If !(XX)='Y'
  151.         Store '0' to N
  152.         GOTO 27
  153.         Do while N<>'*'
  154.           Replace spact with ' '+$(MD&N,1,39)
  155.           SKIP
  156.           Replace spact with ' '+$(MD&N,40,39)
  157.           SKIP
  158.           Store str(val(N)+1,1) to N
  159.         enddo
  160.       endif
  161.     endif
  162. Use
  163. Clear
  164. Store 'January  February March    April    May      June     ' to MONTHS
  165. Store MONTHS+'July     August   SeptemberOctober  November December ' to MONTHS
  166. If $(DATE(),7,2) = '00'
  167.   Set date to 01,01,00
  168. ENDIF
  169.   Store ' ' to curmonthx
  170.   Store ' ' to curyear
  171.   Store ' ' to curmonth
  172.   * Set today's date from current system-date
  173.   Store $(date(),1,2) to curmo
  174.   Store $(date(),7,2) to curmonthx
  175.   Store val(curmo) to nmonth
  176.   Store curmo+curmonthx to indate
  177.   If $(date(),4,1) = '0'
  178.     Store $(DATE(),5,1) to CURMONTHX
  179.   else
  180.     Store $(DATE(),4,2) to CURMONTHX
  181.   endif
  182.   Store trim($(months,NMONTH*9-8,9)) to curmonth
  183.   Store curmonth+' '+curmonthx to curmonthx
  184.   Store ', 19'+$(DATE(),7,2) to CURYEAR
  185. Select secondary
  186. USE CDIRFILE index CDIRFILE
  187. GOTO 1
  188. Store trim($(SPACT,4,27)) to CHNAME
  189. SKIP
  190. Store $(SPACT,21,1) to D
  191. Store curmonthx+curyear to curdate
  192. Release curmonthx,curmonth,indate,nmonth,curmo
  193. GOTO 3
  194. Store $(spact,27,4) to cyearcon
  195. SKIP
  196. Store val($(spact,3,2)) to NN
  197. Store trim($(months,NN*9-8,9)) to CMONTHCO
  198. If $(spact,28,2)='  '
  199.   Store $(spact,3,24) to curdates
  200. else
  201.   Store $(SPACT,3,29)+' ' to curdates
  202. endif
  203. SKIP
  204. If $(spact,3,29)='                            '
  205.   SKIP
  206. else
  207.   If $(spact,28,2)='  '
  208.     Store curdates+$(spact,3,24) to curdates
  209.   else
  210.     Store curdates+$(spact,3,29)+' ' to curdates
  211.   endif
  212.   SKIP
  213.   If $(spact,28,2)='  '
  214.     Store curdates+$(spact,3,24) to curdates
  215.   else
  216.     Store curdates+$(spact,3,29)+' ' to curdates
  217.   endif
  218. endif
  219. GOTO 7
  220. If !($(spact,30,1))='Q'
  221.   Store 15 to wknummax
  222.   GOTO 6
  223.   Store val($(spact,3,2)) to NN
  224.   Store trim($(months,NN*9-8,9)) to cmonthco
  225. else
  226.   Store 6 to wknummax
  227. endif
  228. GOTO 8
  229. Store val($(spact,28,4)) to MAXOFFER
  230. Store maxoffer to OFFERMAX
  231. SKIP
  232. Store F to pageprnt
  233. If !($(SPACT,26,1))='Y'
  234.   Store T to pageprnt
  235. endif
  236. GOTO 12
  237. STORE 'X' TO OCATNAM0
  238. Store '0' to N
  239. Store '  ' to HDR3
  240. Do while OCATNAM&N<>'          ' .and. N<>'4'
  241.   Store str(val(N)+1,1) to N
  242.   Store $(spact,21,10) to OCATNAM&N
  243.   Store HDR3+'  '+OCATNAM&N to HDR3
  244.   SKIP
  245. enddo
  246. If N = '4'
  247.   If OCATNAM4=' '
  248.     STORE $(HDR3,1,37) TO HDR3
  249.   ELSE
  250.     Store '5' to N
  251.   endif
  252. endif
  253. Store '    TOTAL ' to OCATNAM&N
  254. Store HDR3+'  '+OCATNAM&N to HDR3
  255. Store N to OT
  256. GOTO 16
  257. Store ' ' to CSA
  258. If !($(spact,29,1))='Y'
  259.   GOTO 49
  260.   Store trim('-'+$(spact,1,26)) to CSA
  261.   GOTO 50
  262.   Store trim(CSA+$(spact,1,26)) to CSA
  263. endif
  264. GOTO 27
  265. If $(spact,3,29)='                             '
  266.   Store F to OFFNOTE
  267. else
  268.   Store T to OFFNOTE
  269. endif
  270. Release validd1,msel,months,level1,nn,ocatnam0,curyear
  271. Store D+':contrib' to MFILE
  272. Use
  273. Select primary
  274. Store T to continu
  275. RETURN
  276. 
  277.  Store ', 19'+$(DATE(),7,2) to CURYEAR
  278. GOTO 1
  279. Store trim($(SPACT,4,27)) to CHNAME
  280. SKIP
  281. Store $(SPACT,21,1) to D
  282. Store curmo